﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace REPORT.GUI
{
    public partial class FrmXtraReport : DevExpress.XtraEditors.XtraForm
    {
        public string HoTenKH;
        public string DiaChi;
        public string SDT;
        public string TongTienBangSo;
        public string TongTienBangChu;
        public string NgayLap;
        public string HoTenNguoiBan;
        public string SoHD;
        public DataSet xuathd;       
        public FrmXtraReport()
        {
            InitializeComponent();
        }

        private void FrmXtraReport_Load(object sender, EventArgs e)
        {
            XtraRptHoaDon xtrpt = new XtraRptHoaDon();
            xtrpt.xrlblTenKH.Text = HoTenKH.ToString();
            xtrpt.xrlblNguoiMuaHang.Text = HoTenKH.ToString();
            xtrpt.xrlblSDT.Text = SDT.ToString();
            xtrpt.xrlblSoHD.Text = SoHD.ToString();
            xtrpt.xrlblDiaChi.Text = DiaChi.ToString();
            xtrpt.xrCellTongTien.Text = TongTienBangSo.ToString();
            xtrpt.xrlblTongTienBangChu.Text = TongTienBangChu.ToString();
            xtrpt.xrlblNguoiBanHang.Text = HoTenNguoiBan.ToString();
            xtrpt.xrlblNgayLap.Text = NgayLap.ToString();
            xtrpt.DataSource = xtrpt.LoadTheoMaHD(Convert.ToInt32(SoHD));
            xtrpt.BindsListHD();
            documentViewer1.PrintingSystem = xtrpt.PrintingSystem;
            xtrpt.CreateDocument();
        }
    }
}